import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';

import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
import { HomePage } from '../pages/home/home';
import { TabsPage } from '../pages/tabs/tabs';
import { DetailPage } from '../pages/detail/detail';
import { FeedbackPage } from '../pages/feedback/feedback';

import { MistakeComponent } from '../pages/mistake/mistake.component';
import { MistakedetailPage } from '../pages/mistakedetail/mistakedetail';
import { SourcePage } from '../pages/source/source';
import { SourcedetailPage } from '../pages/sourcedetail/sourcedetail';
import { StatusPage } from '../pages/status/status';
import { ListPage } from '../pages/list/list';
import { LogInPage } from '../pages/log-in/log-in';
import {EnrollPage}from '../pages/log-in/enroll';

import { DygraphComponent2 } from '../pages/planInfor/signGraph';
import { PlanPage } from '../pages/plan/planPage';
import { PlanInforPage } from '../pages/planInfor/planInfor'
import { PlanAddPage } from '../pages/planAdd/planAdd'
import { WishPage } from '../pages/wish/wishPage';
import { HabitService } from '../service/habit.service';

//pages about mistake
import {HttpModule} from '@angular/http';
import { CourseListPage } from '../pages/mistake/course-list/course-list';
import { MistakePageModule } from '../pages/mistake/mistake.module';
import { QuestionSetPage } from '../pages/mistake/question-set/question-set';
import { EditMistakesPage } from '../pages/mistake/edit-mistakes/edit-mistakes';
import { TempEditMistakesPage } from '../pages/mistake/temp-edit-mistake/temp-edit-mistake';
import { SameExamplePage } from '../pages/mistake/same-example/same-example';
import { SubstituteQuestionPage } from '../pages/mistake/substitute-question/substitute-question';
import { ChoosePointsPage } from '../pages/mistake/choose-points/choose-points';
import { showMistakeByTimePage } from '../pages/mistake/show-mistakeByTime/show-mistakeByTime';
import { ShowMistakeByPointPage} from '../pages/mistake/show-mistakeByPoint/show-mistakeByPoint';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import {LoginNewService} from "../pages/log-in/login-new.service";

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    DetailPage,
    FeedbackPage,

    MistakeComponent,
    MistakedetailPage,
    SourcePage,
    SourcedetailPage,
    StatusPage,
    ListPage,
    LogInPage,

    DygraphComponent2,
    PlanPage,
    PlanInforPage,
    PlanAddPage,
    WishPage,

    CourseListPage,
    QuestionSetPage,
    EditMistakesPage,
    TempEditMistakesPage,
    SameExamplePage,
    SubstituteQuestionPage,
    ChoosePointsPage,
    showMistakeByTimePage,
    ShowMistakeByPointPage,
    EnrollPage,
  ],
  imports: [
    BrowserModule,
    HttpModule,
   // MistakePageModule,
    IonicModule.forRoot(MyApp)
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    ContactPage,
    HomePage,
    TabsPage,
    DetailPage,
    FeedbackPage,

    MistakeComponent,
    MistakedetailPage,
    SourcePage,
    SourcedetailPage,
    StatusPage,
    ListPage,
    LogInPage,

    CourseListPage,
    QuestionSetPage,
    EditMistakesPage,
    TempEditMistakesPage,
    SameExamplePage,
    SubstituteQuestionPage,
    ChoosePointsPage,
    showMistakeByTimePage,
    ShowMistakeByPointPage,

    PlanPage,
    PlanInforPage,
    PlanAddPage,
    WishPage,
    EnrollPage,
  ],
  providers: [
    StatusBar,
    SplashScreen,
    HabitService,
    LoginNewService,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ],
})
export class AppModule {}
